package com.ld.control.business.process.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 任务节点指令发送信息表
 * </p>
 *
 * @author wangfeng
 * @since 2024-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("process_node_example_running")
@Schema(description = "ProcessNodeExampleRunningModel对象")
public class ProcessNodeExampleRunningModel implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "任务实例id")
    private Long taskExampleId;

    @Schema(description = "子任务实例id")
    private Long subTaskExampleId;

    @Schema(description = "任务流程实例id")
    private Long processExampleId;

    @Schema(description = "任务流程节点实例id")
    private Long processNodeExampleId;

    @Schema(description = "设备方法id")
    private Long equipmentMethodTmpId;

    @Schema(description = "设备id")
    private Long equipmentId;

    @Schema(description = "实际发送的方法名称")
    private String sendMethodName;

    @Schema(description = "状态：0发送成功，1已收到回调，2发送失败")
    private Integer status;

    @Schema(description = "返回结果")
    private String responseResult;

    @Schema(description = "发送时间")
    private Date sendTime;

    @Schema(description = "请求返回时间")
    private Date responseTime;

    @Schema(description = "回调时间")
    private Date callBackTime;

    @Schema(description = "参数解析,把配置在方法参数里面参数和返回结果解析到这里json格式")
    private String intactResponseResult;


    public static final String ID = "id";

    public static final String TASK_EXAMPLE_ID = "task_example_id";

    public static final String SUB_TASK_EXAMPLE_ID = "sub_task_example_id";

    public static final String PROCESS_EXAMPLE_ID = "process_example_id";

    public static final String PROCESS_NODE_EXAMPLE_ID = "process_node_example_id";

    public static final String EQUIPMENT_METHOD_EXAMPLE_ID = "equipment_method_example_id";

    public static final String EQUIPMENT_ID = "equipment_id";

    public static final String SEND_METHOD_NAME = "send_method_name";

    public static final String STATUS = "status";

    public static final String RESPONSE_RESULT = "response_result";

    public static final String SEND_TIME = "send_time";

    public static final String RESPONSE_TIME = "response_time";

    public static final String INTACT_RESPONSE_RESULT = "intact_response_result";

}
